﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class SelectPanel : MonoBehaviour
{
	GameObject current_panel;

	#region MonoBehaviour
	private void Awake()
	{
		current_panel = transform.Find("RootPanel").gameObject;
	}
	#endregion

	public void OpenPanel(GameObject panel)
	{
		this.CloseCurrent();
		panel.SetActive(true);
		current_panel = panel;
	}

	private void CloseCurrent()
	{
		current_panel.SetActive(false);
	}
}
